 function submitModuleToAudit(){
 	// Ajax Validate Module 
	/*-------------function begin---------------------------*/	
	$.ajax({
			type: "post",
	    	dataType:"xml",
			"url" : "CheckDuplicateFileServlet",
			//提交的数�
			data: {},
			beforeSend: function(XMLHttpRequest){
            },
            success: function(data, textStatus){
                 var result    =  $(data).find("result").text();
                 var resultMsg =  $(data).find("resultMsg").text();
                 if(result != "true"){
               		$("#NoticeContent").html(resultMsg + "<br/>");
                 	showStateNotice();
                 }else{
                    chooseQAs();
                 }
		    },
			complete: function(XMLHttpRequest, textStatus){
			},
			error: function(){
				
			}
	})
	/*-------------function end  ---------------------------*/
 }
 
 function checkDuplicate(){
 	// Ajax Check Duplicate File 
	/*-------------function begin---------------------------*/	
	$.ajax({
			type: "post",
	    	dataType:"xml",
			"url" : "CheckDuplicateFileServlet",
			//提交的数�
			data: {},
			beforeSend: function(XMLHttpRequest){
            },
            success: function(data, textStatus){
                 var result    =  $(data).find("result").text();
                 var resultMsg =  $(data).find("resultMsg").text();
                 if(result != "true"){
               		  $("#NoticeContent").html("模型验证不通过，不能提交审核<br/>");
                 	showStateNotice();
                 }else{
                    chooseQAs();
                 }
		    },
			complete: function(XMLHttpRequest, textStatus){
			},
			error: function(){
				
			}
	})
	/*-------------function end  ---------------------------*/
 }
 
 function chooseQAs(){
 	// Ajax GET  QA Members 
	/*-------------function begin---------------------------*/	
	$.ajax({
			type: "post",
	    	dataType:"xml",
			"url" : "AjaxGetQAMembersServlet",
			//提交的数�
			data: {},
			beforeSend: function(XMLHttpRequest){
            },
            success: function(data, textStatus){
               showQAsForChoose(data);
		    },
			complete: function(XMLHttpRequest, textStatus){
			},
			error: function(){
				
			}
	})
	/*-------------function end  ---------------------------*/
 }
 function showChooseContainer(){
 	var screenwidth, screenheight, mytop, getPosLeft, getPosTop          
	screenwidth     = $(window).width();          
	screenheight    = $(window).height();                    //获取滚动条距顶部的偏�移    
	mytop           = $(document).scrollTop();               //计算弹出层的left  
	var myheight    = $("#submitModuleToAuditDiv").height();
	var mywidth     = $("#submitModuleToAuditDiv").width(); 
	getPosLeft      = (screenwidth - mywidth)/2;             //计算弹出层的top        
	getPosTop       = (screenheight - myheight)/2 -50; 
	$("#submitModuleToAuditDiv").css({ "left": getPosLeft, "top": getPosTop });
	showCover();
	$("#submitModuleToAuditDiv").css("display", "block");
	$("#Audit_close").click( function(){  
	     $("#submitModuleToAuditDiv").css({"display" : "none"});
	     hideCover();
	});
 }
 function showQAsForChoose(xmlData){
 	
	var AbsoultePath ="";
	var Description ="";
	$("#QAmembersListDiv").html("");
	 var name     = "";
     var memberId = "";
     $(xmlData).find("QAMember").each(function(index, element) {
        name     = $(this).children("name").text();
        memberId = $(this).children("memberId").text();
        $("#QAmembersListDiv").append("<div style='float:left;width:120px;'><input type='checkbox' name='qa_memberId' value='"+memberId+"' />"+name+"</div>");
     });
     $("#QAmembersListDiv").append("<div style='clear:both' ></div>");
     
     showChooseContainer();
 }
 function submitAuditModule(){
 	var choose_memberIds = get_qa_memberIds();
 	if(choose_memberIds.trim().length == 0){
 	    alert("清选择QA审核人员");
 	    return;
 	}
 	//alert(choose_memberIds);
 	// Ajax GET  QA Members 
	/*-------------function begin---------------------------*/	
	$.ajax({
			type: "post",
	    	dataType:"xml",
			"url" : "SubmitModuleToAuditServlet",
			//提交的数�
			data: {memberIds:choose_memberIds},
			beforeSend: function(XMLHttpRequest){
				$("#QAmembersListDiv").html("<div style='margin:10px;' >数据提交中……</div>");
				$("#qaSubmitButton").attr("disabled","disabled");
				$("#qaCaselButton").attr("disabled","disabled");
            },
            success: function(data, textStatus){
               var result    =  $(data).find("Result").text();
               if(result == "success"){
               	   $("#NoticeContent").html("【提交审核】操作成功！<br/>");
                 	showStateNotice();
                 	//重服务端重新加载页面
                 	hiddenSubmitAudit()
                 	opensrc("Welcome.jsp");
                 	setTimeout(function(){
                 		location.reload();
                 		opensrc("Welcome.jsp");
                 	},2000);
               }else{
               		 $("#NoticeContent").html("【提交审核】操作失败，请联系管理员！<br/>");
               }
		    },
			complete: function(XMLHttpRequest, textStatus){
				$("#QAmembersListDiv").html("");
				$("#qaSubmitButton").removeAttr("disabled")  ;
				$("#qaCaselButton").removeAttr("disabled")  ;
			},
			error: function(){
				
			}
	})
	/*-------------function end  ---------------------------*/
 }
 function hiddenSubmitAudit(){
 	$("#submitModuleToAuditDiv").css({"display" : "none"});
 	hideCover();
 }
 function get_qa_memberIds(){
 	memberIds = document.getElementsByName("qa_memberId");
 	
 	var choose_Ids="";
 	for(i = 0; i < memberIds.length ; i++){
 		if(memberIds[i].checked){
 			choose_Ids =choose_Ids + memberIds[i].value + ",";
 		}
 	}
 	if(choose_Ids.length >0){
 		choose_Ids = choose_Ids.substr(0,choose_Ids.length-1);
 	}
 	
 	return choose_Ids;
 }